package com.geekbang.work;

import com.geekbang.boot.School;
import com.geekbang.boot.Student;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ConfigurableApplicationContext;

/**
 * @author nhsoft.lul
 */
@SpringBootApplication
public class Application {

    public static void main(String[] args) {
        ConfigurableApplicationContext configurableApplicationContext = SpringApplication.run(Application.class, args);

        Student student = configurableApplicationContext.getBean(Student.class);
        student.print();
        School school = configurableApplicationContext.getBean(School.class);
        school.ding();
    }

}
